<template>
    <div>
        <div class="tab-nav "> 
   <div class="wrapper"> 
    <ul class="fl sui-nav nav-tabs navbar-dark"> 
     <router-link to="/qa/label/0" tag="li" active-class="active"><a>首页</a></router-link>

        <router-link :to="'/qa/label/'+label.id" 
        tag="li" active-class="active"
        v-for="(label,index) in labelList" :key="index"
        ><a>{{label.labelname}}</a></router-link>
    </ul> 
    <span class="fr more"><a href="./qa-allTag.html" target="_blank">更多</a></span> 
    <div class="clearfix"></div> 
   </div> 
  </div> 
  <!--两列布局--> 
  <div class="wrapper qa-content"> 

      <!-- 加载子页面 -->
      <nuxt-child />


   <div class="fl right-tag"> 
    <div class="block-btn"> 
     <p>今天，有什么好东西要和大家分享么?</p> 
     <a class="sui-btn btn-block btn-share" href="./qa-submit.html" target="_blank">发布问题</a> 
    </div> 
    <div class="hot-tags"> 
     <div class="head"> 
      <h3 class="title">热门标签</h3> 
     </div> 
     <div class="tags"> 
      <ul class="sui-tag"> 
       <li>Php</li> 
       <li>Javascript</li> 
       <li>Gif</li> 
       <li>Java</li> 
       <li>C#</li> 
       <li>iOS</li> 
       <li>C++</li> 
      </ul> 
     </div> 
    </div> 
   </div> 
   <div class="clearfix"></div> 
  </div> 
  
    </div>
</template>

<script>
//问答样式
import '@/assets/css/page-sj-qa-logined.css'

import labelApi from '@/api/label'

export default {
  head:{
    title: '十次方社交 - 问答'
  },
  asyncData() {
      return labelApi.toplist().then(res=>{
          return {
              labelList: res.data.data
          }
      })
  }
}
</script>
